package com.lwc.cfdns.pojo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.lwc.cfdns.pojo.BaseEntity;

import java.io.Serializable;
import java.time.LocalDateTime;

import com.lwc.cfdns.pojo.dto.ValidGroup;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 字典类型表
 *
 * @TableName cfdns_system_dict
 */
@TableName(value = "cfdns_system_dict")
@Data
public class SystemDict extends BaseEntity implements Serializable {
    /**
     * 字典主键
     */
    @TableId(type = IdType.AUTO)
    @NotNull(message = "ID不能为空", groups = {ValidGroup.Update.class})
    private Long id;

    /**
     * 字典名称
     */
    @NotBlank(message = "字典名称不能为空", groups = {ValidGroup.Create.class, ValidGroup.Update.class})
    private String name;

    /**
     * 字典类型(唯一标识)
     */
    @NotBlank(message = "字典标识不能为空", groups = {ValidGroup.Create.class, ValidGroup.Update.class})
    private String marks;

    /**
     * 状态（0正常 1停用）
     */
    private String status = "0";

    /**
     * 系统内置（Y是 N否）
     */
    @Length(min = 1, max = 1, message = "系统内置参数长度只能为一个字符", groups = {ValidGroup.Create.class, ValidGroup.Update.class})
    private String type = "N";

    /**
     * 备注
     */
    private String remark;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}